package com.woniu.service.impl;

import com.woniu.dao.IDeptDao;
import com.woniu.service.IDeptService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhaolei
 * @date 2021/4/13 - 23:45
 */
//@Component("deptService")
@Service("deptService")
public class DeptServiceImpl implements IDeptService {
    @Resource(name = "deptDaoJpa")
    /**
     * @Resource  首先按照名称进行自动装配，如果名称对应不上，则会按照类型进行装配
     */
    private IDeptDao iDeptDao;
    @Override
    public List findAllDepts() {
        return iDeptDao.findAll();
    }
}
